<?php
namespace model;

use think\Model;

class UserDetail extends Model{

    public function getgenderTextAttr($value, $data){
        $gender = [
            0 => '保密',
            1 => '男',
            2 => '女'
        ];
        return $gender[$data['gender']];
    }
}